import request from "@/utils/request";

// post
export function postAction(url: string, parameter: any) {
    return request ({
        url: url,
        method: 'post',
        data: parameter
    })
}

//post method= {post | put}
export function httpAction(url: string, parameter: any, method: string) {
    return request({
        url: url,
        method:method,
        data: parameter
    })
}

//put
export function putAction(url: string, parameter: any) {
    return request({
        url: url,
        method:'put',
        data: parameter
    })
}

//get
export function getAction(url: string, parameter: any) {
    return request({
        url: url,
        method: 'get',
        data: parameter
    })
}

//deleteAction
export function deleteAction(url: string, parameter: any) {
    return request({
        url: url,
        method: 'delete',
        params: parameter
    })
}

